#include <stdio.h>
int main(){
	int a = 0;scanf("%d",&a);
	int b = a%3;
	int c = a%5;
	int d = a%7;
	if(b==0||c==0||d==0){if(b==0){printf("3 ");
	}
	if(c==0){printf("5 ");
	}
	if(d==0){printf("7");
	}
	}else{printf("n");}
	return 0;
}
